#!/usr/bin/env python
# -*- coding:utf-8 -*-

from flask_restful import Api

from . import historyinfo_blueprint
from api_1_0.historyInfoResource.historyInfoResource import HistoryInfoResource
from api_1_0.historyInfoResource.historyInfoOtherResource import HistoryInfoOtherResource

api = Api(historyinfo_blueprint)

api.add_resource(HistoryInfoResource, '/historyInfo/<AutoID>', '/historyInfo', endpoint='historyInfo')


# # joint query
# @historyinfo_blueprint.route('/historyInfo/query', methods=['GET'], endpoint='historyInfo_query')
# def HistoryInfo_query():
#     return HistoryInfoOtherResource.joint_query()
#
# # joint query
# @historyinfo_blueprint.route('/historyInfo/addhistory', methods=['POST'], endpoint='historyInfo_addhistory')
# def HistoryInfo_addhistory():
#     return HistoryInfoOtherResource.addhistory()

#API 水平越权
@historyinfo_blueprint.route('/historyInfo/gethistoryinfov1', methods=['GET'], endpoint='historyInfo_gethistoryinfov1')
def HistoryInfo_gethistoryinfo():
    return HistoryInfoOtherResource.gethistoryinfoV1()

#API 水平越权解决
# @historyinfo_blueprint.route('/historyInfo/gethistoryinfov2', methods=['GET'], endpoint='historyInfo_gethistoryinfov2')
# def HistoryInfo_gethistoryinfo():
#     return HistoryInfoOtherResource.gethistoryinfo()